package com.xbongbong.pro.publicgroup.pojo.dto;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.domain.entity.ext.OptionalRangeEntity;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @description: 公海池分组设置项保存
 * @Author: hongxiao
 * @date: 2019-03-03 15:07
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class PublicGroupSetSaveDTO extends BaseDTO {
    /**
     * 分组id
     */
    private Long id;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * 名称
     */
    @NotNull(message = "{dto.msg.publicGroupSetSave.name.NotNull}")
    @Size(min=1, max=50, message="{dto.msg.publicGroupSetSave.name.Size}")
    private String name;
    /**
     * 表单id
     */
    @NotNull(message = "{dto.msg.publicGroupSetSave.formId.NotNull}")
    private Long formId;
    /**
     * 是否启用
     */
    @NotNull(message = "{dto.msg.publicGroupSetSave.enable.NotNull}")
    @Min(value = 0, message = "{dto.msg.publicGroupSetSave.enable.Min}")
    @Max(value = 1, message = "{dto.msg.publicGroupSetSave.enable.Max}")
    private Integer enable;
    /**
     * 分组查看权限
     */
    private List<OptionalRangeEntity> scopeRule;
    /**
     * 分组筛选条件
     */
    private JSONArray jsonData;
}
